xen: arm: introduce assembly helper to call smc
authorJulien Grall <julien.grall@linaro.org>
Thu, 16 Oct 2014 12:34:18 +0000 (13:34 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 20 Oct 2014 12:00:19 +0000 (13:00 +0100)
commit4697555d2a2800a41d86c28cfaa1cca8037f3f06
tree958e40b6862272c2c8441709b6bde3472411e49c
parent9cea500dc0294947b12b8e2479a238acd0e990f2
xen: arm: introduce assembly helper to call smc

Commit 063188f4b3 "xen: arm: Add support for the Exynos secure firmware"
introduced code assuming that exynos_smc() would get called with arguments in
certain registers. While the "noinline" attribute guarantees the function to
not get inlined, it does not guarantee that all arguments arrive in the assumed
registers: gcc's interprocedural analysis can result in clone functions to be
created where some of the incoming arguments (commonly when they have constant
values) get replaced by putting in place the respective values inside the
clone.

Xen contains in multiple place of this SMC function: consolidate the function
in a single place and write it in assembly.

Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- reworded commit message as discussed ]
xen/arch/arm/Makefile
xen/arch/arm/platforms/exynos5.c
xen/arch/arm/platforms/seattle.c
xen/arch/arm/psci.c
xen/arch/arm/smc.S [new file with mode: 0644]
xen/include/asm-arm/arm32/macros.h [new file with mode: 0644]
xen/include/asm-arm/macros.h [new file with mode: 0644]
xen/include/asm-arm/processor.h